﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/HomeSite.Master" Inherits="System.Web.Mvc.ViewPage<TimeTableManagement.Entities.Tb_Slot_Room>" %>

<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>

<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>

    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="100%" 
        CssFilePath="~/App_Themes/Aqua/{0}/styles.css" CssPostfix="Aqua" 
        GroupBoxCaptionOffsetY="-28px" 
        SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
        <ContentPaddings Padding="14px" />
        <PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
<% using (Html.BeginForm()) { %>
    <%: Html.ValidationSummary(true) %>
    
        <%: Html.HiddenFor(model => model.id) %>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.id_room, "Room") %>
        </div>
        <div class="editor-field">
        
            <%: Html.DisplayFor(model => model.Tb_Room.name) %>
            <input id="id_room" name="id_room" value="<%: Model.id_room %>" type="hidden" />
            <%: Html.ValidationMessageFor(model => model.id_room) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.id_slot, "Slot") %>
        </div>
        <div class="editor-field">
            <%: Html.DisplayFor(model => model.Tb_Slot.slot) %>
            <input id="id_slot" name="id_slot" value="<%: Model.id_slot %>" type="hidden" />
            <%: Html.ValidationMessageFor(model => model.id_slot) %>
        </div>
    
        <div class="editor-label">
            <%: Html.LabelFor(model => model.date) %>
        </div>
        <div class="editor-field">
            <%: TimeTableManagement.Entities.Tb_Slot_Room.getDay(Model.date) %>
            <input id="date" name="date" value="<%: Model.date %>" type="hidden" />
            <%: Html.ValidationMessageFor(model => model.date) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.action) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.action)%>
            <%: Html.ValidationMessageFor(model => model.action) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.description) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.description) %>
            <%: Html.ValidationMessageFor(model => model.description) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.status) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.status) %>
            <%: Html.ValidationMessageFor(model => model.status) %>
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>

<% } %>

<div>
    <%: Html.ActionLink("Back to List", "Index") %>
</div>
</dx:PanelContent>
</PanelCollection>
    </dx:ASPxRoundPanel>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
    .editor-label
    {
        font-weight: 700;
    }
    </style>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="leftmenu" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="menuright" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Footer" runat="server">
</asp:Content>
